Skip to content

Specify null safety subtyping #3515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 82 commits into
base: main
Choose a base branch
from

Conversation

eernstg
Copy link
Member

@eernstg eernstg commented Dec 14, 2023

This PR contains the null-safety updates from #2605 (the overall null-safety PR) that are concerned with subtyping. The intention is that we process and land this PR, and #2605 will then be made smaller when it is rebased over this one, thus allowing us to deal with the null-safety update in smaller portions.

@eernstg eernstg force-pushed the specify_null_safety_subtyping_dec23 branch from 082c391 to a9f4886 Compare December 18, 2023 13:27
Copy link
Member

@lrhn lrhn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't really review this as source.
Do we still have a way to generate a rendering showing the changes?

@eernstg eernstg force-pushed the specify_null_safety_subtyping_dec23 branch from a9f4886 to 0fd9980 Compare February 9, 2024 13:53
@eernstg eernstg force-pushed the specify_null_safety_subtyping_dec23 branch from 0fd9980 to 84e6d38 Compare August 13, 2024 17:18
@eernstg eernstg force-pushed the specify_null_safety_subtyping_dec23 branch from 84e6d38 to 4fcf76e Compare September 2, 2024 16:13
@eernstg eernstg force-pushed the specify_null_safety_subtyping_dec23 branch from 4fcf76e to b7cdb30 Compare September 23, 2024 09:56
@eernstg eernstg force-pushed the specify_null_safety_subtyping_dec23 branch from b7cdb30 to bf98431 Compare October 11, 2024 13:38
@eernstg
Copy link
Member Author

eernstg commented Oct 17, 2024

dartLangSpec-3515.pdf

@eernstg
Copy link
Member Author

eernstg commented Oct 18, 2024

Based on the output from git diff main..., here is an overview of the changes:

Front matter

Only comments.

@@ -21633,128 +21631,188 @@

Section 'Subtypes': Now mentions intersection types.

Figure 'Subtype rules': Changed a lot.

Subsection 'Meta-Variables': Slightly changes presentation of
metavariables.

Subsection 'Subtype Rules': Introduces the 'canonical syntax' of a
type. Controversial! An alternative could be to say that subtype rules
are not applicable to syntax, they are applicable to semantic
entities that are normalized in the same way as canonical syntax does
it. Extensively rewritten.

Subsection 'Being a Subtype': Extensively rewritten.

Subsubsection 'Informal subtype rule descriptions': Rewritten extensively.

Subsection 'Additional Subtyping Concepts': Extensively rewritten.

Section 'Function Types': Last paragraph modified.

Section 'Type Function': Rewritten.

@@ -22482,7 +22498,7 @@

Just the title of section 'Type dynamic' was adjusted, for consistency
(that is: titles do not use non-standard fonts).

Section 'Type FutureOr': Just adding missing \Error{} on static
errors, and updating Object to Object? in an example.

Section 'Type void': Removed commentary that reiterated an obsolete
definition of Type equality. Removed the item that enabled await expressionOfTypeVoid, because that rule that enabled this usage has
been removed from the language. Example at the end is updated.

Subsection 'Void Soundness': Example updated, plus body text about the
example.

@@ -23324,156 +23324,238 @@

Section 'Appendix: Algorithmic Subtyping': Updated to use the
NNBD-updated presentation of the subtype rules.

@eernstg eernstg requested a review from leafpetersen October 18, 2024 10:32
@eernstg
Copy link
Member Author

eernstg commented Oct 21, 2024

I tried to use latexdiff to generate a PDF that shows the differences, but it doesn't handle "non-standard" LaTeX (which seems to be difficult to avoid). I can generate a PDF that shows some differences and stops at page 232, but it would take some more experimentation to produce something that shows the differences in a way that can be relied upon.

@eernstg
Copy link
Member Author

eernstg commented Nov 1, 2024

I added a section about 'being the same type', and adjusted the text such that the thing previously known as 'canonical syntax' (now renamed to 'explicitly resolved syntax') is encapsulated in this section. Also, alpha equivalence has been made part of this 'being the same type' section.

@eernstg eernstg force-pushed the specify_null_safety_subtyping_dec23 branch 2 times, most recently from 54323ec to d02466b Compare November 28, 2024 09:30
@eernstg eernstg force-pushed the specify_null_safety_subtyping_dec23 branch 2 times, most recently from 23b26ca to 70aafbc Compare March 6, 2025 13:46
@eernstg eernstg force-pushed the specify_null_safety_subtyping_dec23 branch from 70aafbc to 249579f Compare April 8, 2025 14:24
@eernstg eernstg force-pushed the specify_null_safety_subtyping_dec23 branch 2 times, most recently from 24efd03 to 27f972b Compare July 9, 2025 10:31
@eernstg eernstg requested a review from leafpetersen August 15, 2025 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants